package tangyaxin.www.saoerweima;

import android.content.Intent;
import android.os.Bundle;
import android.widget.EditText;

import com.sam.widget.headerBar.BaseHeaderView;
import com.sam.widget.headerBar.LeftImgTitleRightImgBar;

/**
 * Created by Administrator on 2016/7/14.
 */
public class ActivityUrl extends BaseAcitivity {
    private LeftImgTitleRightImgBar header;
    private EditText urlEditText;
    private String urlText;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_make_url);
        findview();
        initview();
    }

    @Override
    protected void findview() {
        header= (LeftImgTitleRightImgBar) findViewById(R.id.url_head);
        urlEditText= (EditText) findViewById(R.id.url_text);
    }

    @Override
    protected void initview() {
        header.setOnHeaderClickListner(onHeaderClickListener);
    }
    private BaseHeaderView.OnHeaderClickListener onHeaderClickListener=new BaseHeaderView.OnHeaderClickListener() {
        @Override
        public void onHeaderLeftClicked() {
            finish();
        }

        @Override
        public void onHeaderCenterClicked() {

        }

        @Override
        public void onHeaderRightClicked() {
            urlText=urlEditText.getText().toString();
            startActivity(new Intent(ActivityUrl.this,QRMakeActivity.class));
        }
    };
}
